<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
            div{
                width: 300px;
                /* height: 300px; */
                border: 3px solid red;
                margin: 200px auto; 
                /* overflow: hidden; */
            }
            img{
                width: 100%;
                transition: all 2s;

                /* 改变中心点的位置
                    center
                    left top
                    left bottom

                    left center

                    right top
                    right bottom

                    right center
                */
                transform-origin:  center;
            }
            div:hover img{
                /* width: 500px; */
                transform: scale(2);
            }
            /* scale 负值 倒像放大
            支持x轴 y轴单独放大
            scaleX  scaleY
             */

    </style>
</head>
<body>

    <div>
        <img src="./image/4.png" alt="">
    </div>
</body>
</html>